<!DOCTYPE html>
<html lang='en'>
<meta charset='utf-8'>
<head>
<title>Weixin后台管理</title>

<!-- 警告对话框 -->	
<script src="sweetalert/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="sweetalert/sweetalert.css">  
<!--  
 <script type="text/javascript">
	if(typeof(EventSource) !== "undefined") {
		 var evtSource = new EventSource("/shambles/sse");
         var alertdialog=document.getElementById("alertdialog");
         var alertchar=document.getElementById("alertchar");
		 evtSource.addEventListener("ping", function(e){
			var obj = JSON.parse(e.data);
			
		     swal({
					title: "昵称 : "+obj.nickName, 
					imageUrl:obj.imgUrl,
					text:
	              //    "<br /> campusId :"+ obj.campusId
	                   "<h3>商品名称 :"+ obj.campusName+
	                   "<br />订单号 : "+obj.id+
						"<br />商品号 : "+obj.foodId+
	                   "<br />  数量 :"+obj.amount+
	                   "<br />  管理员 :"+obj.campusAdmin+
	              //    "<br /> nickName :"+ obj.nickName
	              //    "<br /> keyCode :"+obj.keyCode
	                   "</h3>", 
	                html: true,
					type: "warning",
					showCancelButton: true,
					closeOnConfirm: false,
					confirmButtonText: "确认",
					confirmButtonColor: "#44b549"
					}, function() {
						$.ajax({
							url: "/shambles/consumemanage/commit.do",
							type: "post",
							data:{campusAdmin:obj.campusAdmin,campusId:obj.campusId,
                                  openId:obj.openId,id:obj.id},
							dataType:'json'
						}).done(function(data) {
							if(data==1)
							 swal("操作成功!", "已成功消费商品！", "success");
							else{
								swal("操作失败", "确认消费失败!", "error");
							}
						}).error(function(data) {
							swal("OMG", "未知错误,操作失败!", "error");
						});
					});
		     
		     if(obj.j>50){
		    	 swal({   
		 			title: "已过期",      
		 			imageUrl: "sweetalert/images/thumbs-up.jpg",
		 			html: true,
		 			timer: 1000,   
		 			showConfirmButton: false
		 		});
		     }
		     
		     $(".cancel").on("click",function(){
		    	 $.post("/shambles/consumemanage/cancel.do", {
		             campusAdmin:obj.campusAdmin,
		             keyCode:obj.keyCode
		    	}, function(text) {
		    		
		    	});
		     });
		     
		    console.log(obj.campusAdmin+"  "+e.data);
		  }, false);

		  evtSource.addEventListener("open", function(e) {
		    // Connection was opened.
			 console.log("sse open");
		  }, false);

		  evtSource.addEventListener("error", function(e) {
		  }, false);
		  
		  evtSource.addEventListener("close", function(e) {
		      
			  }, false);
		  
		} else {
			 alert("您的浏览器不支持的EventSource,请更换浏览器");
	}
	
</script>
-->  

<link rel='stylesheet' type='text/css' href='css/bootstrap2.min.css'>
<link rel="stylesheet"
	href="assets/bootstrap-table/bootstrap.min.css"><!-- 必须注意引入顺序  -->
<link rel='stylesheet' type='text/css' href='css/style.css'>
<link rel="shortcut icon" href="img/icon.png">
<script type='text/javascript' src="js/jquery.js"></script>
<script type='text/javascript' src="js/bootstrap.min.js"></script>
<script type='text/javascript' src="js/main.js"></script>
<script type="text/javascript" src="js/util.js"></script>

<link href="bootstrap/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">

<style>
a:hover {
	text-decoration: none
}

.sideBar ul{
	border: 1px solid #eee;
}
</style>

</head>

<body>
	<header class='navbar blue navbar-fixed-top'>
		<div class='navbar-inner'>
			<div class='container-fluid'>
				<a class='brand pull-left' ><img src="img/icon.png" width="20px" height="auto">&nbsp;
				</a><a  class='brand pull-left' id="brand">For</a>
				<ul class='nav pull-right'>
					<li>
						<!-- 添加公众号下拉菜单 -->
						<div class="dropdown" id="campusDropdown">
							<button type="button" class="btn dropdown-toggle"
								id="dropdownMenu1" data-toggle="dropdown">
								<span class="change">选择公众号</span> <span class="caret"></span>
							</button>
							<ul class="dropdown-menu" id="dropdown-campus"
							  style="height: 200px; overflow: auto">

							</ul>
						</div>
					</li>
					<li><a href="../shambles/user/logout.do" rel='tooltip'
						title='退出'><i class='icon-white icon-off'></i></a></li>
				</ul>
			</div>
		</div>
	</header>

	<section class='container-fluid pad20'>
		<section class='row-fluid'>
			<div class="sideBar left">
				<br />
				<ul>
					
					<li><figure id="wechatMenu">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-cog'></i> 菜单管理&nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					
					<li><figure id="auser">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-user'></i> 用戶管理&nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					
					<!--  
					<li><figure id="photo">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-user'></i> 图片管理&nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					-->
					
					<li><figure id="access">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-user'></i> 访问统计&nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					
					<li><figure id="roominfo">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-user'></i> 房屋信息&nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					
					 
					<li><figure id="messageList">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-user'></i> 消息列表&nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					
					<!--  
					<li><figure id="roomChange">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-user'></i> 承租人&nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					
					-->
										
					
					<li><figure id="qrCode">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-user'></i> 二维码 &nbsp;&nbsp;
							</a>
					</figure><hr /></li>
					
					<li><figure id="setting">
							<a href="javascript:void(0);" target="content"> <i
								class='icon-cog'></i> 微信设置&nbsp;&nbsp;
							</a>
					</figure><hr /></li>	
				</ul>
			</div>


           <div id="content" src="">
		
		</section>
	</section>
			
<style type="text/css">  <!--避免bootstrap框架窗口变化造成元素高度的变化 -->
 .left{           
    position: absolute;
    position: relative;
    float: left;
 }
#content{
   margin-left:120px;
   position: absolute;
}

.change{
  color:red;
}

 .result-icon{
 position: relative;
  top:2px;
  display: inline-block;

   width:26px;
   height:15px;
  }
 .result-fail{
  background-image:url('img/weixin.png') ;
  background-repeat:no-repeat;
  -moz-background-size: 25px 18px;
    -webkit-background-size: 25px 18px;
    -o-background-size: 25px 18px;
    background-size: 25px 18px;
}

}
</style>

<script type="text/javascript" src="assets/bootstrap-table/bootstrap-table.js"></script>
<script type="text/javascript" src="pages/js/admin.js"></script>

<script type="text/javascript">
 var u = navigator.userAgent;
 var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
 var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
 if(isAndroid||isiOS){
	location.href="mobile/admin/index.html";
 }
</script>

</body>
</html>
